java program to find maximum and minimum number using array